home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Interfaces & Libraries / Interfaces / AIncludes / AppleTalk.a < prev    next >
Encoding:
Text File  |  1993-11-30  |  23.8 KB  |  637 lines  |  [TEXT/MPS ]

  1. ;    File:        AppleTalk.a
  2. ;
  3. ;    Copyright:    © 1983-1993 by Apple Computer, Inc.
  4. ;                All rights reserved.
  5. ;
  6. ;    Version:    System 7.1 for ETO #11
  7. ;    Created:    Tuesday, March 30, 1993 18:00
  8. ;
  9. ;___________________________________________________________________________
  10.  
  11.     IF &TYPE('__INCLUDINGAPPLETALK__') = 'UNDEFINED' THEN
  12. __INCLUDINGAPPLETALK__    SET            1
  13.  
  14.     IF &TYPE('__INCLUDINGSYSEQU__') = 'UNDEFINED' THEN
  15.                         INCLUDE        'SysEqu.a'
  16.     ENDIF
  17.  
  18. ;
  19. ; AppleTalk unit numbers.
  20. ;
  21. mppUnitNum        EQU         9                         ; MPP unit number
  22. atpUnitNum        EQU         10                        ; ATP unit number
  23. xppUnitNum        EQU         40                        ; XPP unit number
  24. ;
  25. atpLoadedBit      EQU         4                         ; ATP loaded bit number in PortBUse
  26. xppLoadedBit      EQU         atpLoadedBit+1            ; XPP loaded bit number in PortBUse
  27. ;
  28. ;+ Name Binding Protocol (NBP)
  29. ;
  30. nbp               EQU         $02                       ; DDP protocol type code for NBP
  31. ;
  32. nbpControl        EQU         0                         ; Control code
  33. nbpTCount         EQU         0                         ; Tuple count
  34. nbpID             EQU         1                         ; NBP ID
  35. nbpTuple          EQU         2                         ; Start of the first tuple
  36. ;
  37. ;NBP tuple header offsets:
  38. ;
  39. tupleNet          EQU         0                         ; Offset to network no. [word]
  40. tupleNode         EQU         2                         ; Offset to node ID [byte]
  41. tupleSkt          EQU         3                         ; Offset to socket number [byte]
  42. tupleEnum         EQU         4                         ; Offset to enumerator [byte]
  43. tupleName         EQU         5                         ; Offset to name part of tuple [byte]
  44. tupleAddrSz       EQU         5                         ; tuple address field size
  45. ;
  46. ; NBP control codes - the following define the different types of NBP packets:
  47. ;
  48. brRq              EQU         1                         ; Broadcast request
  49. lkUp              EQU         2                         ; Lookup request
  50. lkUpReply         EQU         3                         ; Lookup reply
  51. ;
  52. ; NBP miscellaneous
  53. ;
  54. nis               EQU         2                         ; Names Information Socket (NIS) number
  55. tupleMax          EQU         15                        ; Most tuples in a lookup reply
  56. equals            EQU         '='                       ; Wildcard symbol
  57. star              EQU         '*'                       ; "This zone" symbol
  58. ;
  59. ;
  60. ;+ Routing Table Maintenance Protocol (RTMP)
  61. ;
  62. rtmp              EQU         $01                       ; DDP protocol type code for RTMP
  63. ;
  64. ; RTMP header offsets
  65. ;
  66. rtmpNet           EQU         0                         ; Offset to network number [word]
  67. rtmpIDLen         EQU         2                         ; Offset to ID length [byte]
  68. rtmpID            EQU         3                         ; Offset to start of ID field
  69. ;
  70. ; RTMP packets are received at the well-known RTMP listening socket:
  71. ;
  72. rtmpSkt           EQU         1                         ; Number of the RTMP socket
  73. ;
  74. ;
  75. ;;+ Datagram Delivery Protocol (DDP)
  76.  
  77. ddpHopCnt         EQU         0                         ; Hop count (only used in long header) [byte]
  78. ddpLength         EQU         0                         ; Packet length (from this word onwards) [word]
  79. ddpChecksum       EQU         2                         ; Checksum [word]
  80. ddpDstNet         EQU         4                         ; Destination network no. [word]
  81. ddpSrcNet         EQU         6                         ; Network of origin [word]
  82. ddpDstNode        EQU         8                         ; Destination node address [byte]
  83. ddpSrcNode        EQU         9                         ; Node of origin [byte]
  84. ddpDstSkt         EQU         10                        ; Destination socket number [byte]
  85. ddpSrcSkt         EQU         11                        ; Source socket number [byte]
  86. ddpType           EQU         12                        ; DDP type field [byte]
  87. ;
  88. sddpDstSkt        EQU         2                         ; Destination socket number (short header) [byte]
  89. sddpSrcSkt        EQU         3                         ; Source socket number (short header) [byte]
  90. sddpType          EQU         4                         ; DDP type field (short header) [byte]
  91. ;
  92. ddphSzLong        EQU         13                        ; Size of extended DDP header
  93. ddphSzShort       EQU         5                         ; Size of short DDP header
  94. ;
  95. shortDDP          EQU         $01                       ; LAP type code for DDP (short header)
  96. longDDP           EQU         $02                       ; LAP type code for DDP (long header)
  97. ;
  98. ; DDP miscellaneous
  99. ;
  100. ddpMaxWKS         EQU         $7F                       ; The highest valid well-known socket
  101. ddpMaxData        EQU         586                       ; Maximum DDP data size
  102. ddpLenMask        EQU         $03FF                     ; Mask for DDP length
  103. ;
  104. ;
  105. ;+ AppleBus Link Access Protocol (ABLAP)
  106. ;
  107. lapDstAdr         EQU         0                         ; Destination node address [byte]
  108. lapSrcAdr         EQU         1                         ; Source node address [byte]
  109. lapType           EQU         2                         ; LAP type field [byte]
  110. lapHdSz           EQU         3                         ; Size of LAP header
  111. ;
  112. ; zs returned by ReadPacket and ReadRest routines
  113. ;
  114. overrunErr        EQU         -1
  115. crcErr            EQU         -2
  116. underrunErr       EQU         -3
  117. lengthErr         EQU         -4
  118. ;
  119. ; SCC interrupt priority
  120. ;
  121. sccLockout        EQU         $2600                     ; This value works on both Mac and Lisa
  122. ;
  123. ;
  124. ;+ MPP (control calls to NBP, DDP and ABLAP)
  125. ;
  126. lookupReply       EQU         242                       ; This command queued to ourself
  127. writeLAP          EQU         243                       ; Write out LAP packet
  128. detachPH          EQU         244                       ; Detach LAP protocol handler
  129. attachPH          EQU         245                       ; Attach LAP protocol handler
  130. writeDDP          EQU         246                       ; Write out DDP packet
  131. closeSkt          EQU         247                       ; Close DDP socket
  132. openSkt           EQU         248                       ; Open DDP socket
  133. loadNBP           EQU         249                       ; Load NBP command-executing code
  134. lastResident      EQU         249                       ; Last resident command
  135. confirmName       EQU         250                       ; Confirm name
  136. lookupName        EQU         251                       ; Look up name on internet
  137. removeName        EQU         252                       ; Remove name from Names Table
  138. registerName      EQU         253                       ; Register name in Names Table
  139. killNBP           EQU         254                       ; Kill outstanding NBP request
  140. unloadNBP         EQU         255                       ; Unload NBP command code
  141. setSelfSend       EQU         256                       ; MPP: Set to allow writes to self
  142. SetMyZone       EQU         257                     ; Set my zone name
  143. GetATalkInfo     EQU            258                     ; get AppleTalk information
  144. ATalkClosePrep    EQU          259                     ; AppleTalk close query
  145. ;
  146. ;
  147. ; MPP queue element standard structure: arguments passed in the CSParam area
  148. ;
  149. socket            EQU         $1C                       ; Offset to socket number (DDP) [byte]
  150. checkSumFlag      EQU         $1D                       ; Offset to checksum flag (DDP) [byte]
  151. listener          EQU         $1E                       ; Offset to socket listener (DDP) [word]
  152. argBlkSz          EQU         $10                       ; Size of argument block to WriteDDP
  153. wdsPointer        EQU         $1E                       ; Offset to WDS pointer (DDP & ABLAP) [word]
  154. ;
  155. protType          EQU         $1C                       ; Offset to protocol type code (ABLAP) [byte]
  156. handler           EQU         $1E                       ; Offset to protocol handler (ABLAP) [word]
  157. ;
  158. interval          EQU         $1C                       ; Retry interval (NBP) [byte]
  159. count             EQU         $1D                       ; Retry count (NBP) [byte]
  160. entityPtr         EQU         $1E                       ; Entity pointer (NBP)
  161. ntQElPtr          EQU         $1E                       ; NT queue element ptr (NBP - Register)
  162. confirmAddr       EQU         $22                       ; Address to confirm at (NBP - Confirm)
  163. newSocket         EQU         $26                       ; Socket no. if different (NBP - Confirm) [byte]
  164. ;
  165. verifyFlag        EQU         $22                       ; Verify name flag (NBP - Register) [byte]
  166. ;
  167. retBuffPtr        EQU         $22                       ; Return buffer pointer (NBP - Lookup)
  168. retBuffSize       EQU         $26                       ; Return buffer size (NBP - Lookup) [word]
  169. maxToGet          EQU         $28                       ; Max no. responses to get (NBP - Lookup) [word]
  170. numGotten         EQU         $2A                       ; Number actually gotten (NBP - Lookup) [word]
  171. ;
  172. newSelfFlag       EQU         $1C                       ; Offset: New value for self-send flag
  173. oldSelfFlag       EQU         $1D                       ; Old value of self-send flag
  174. nKillQEl          EQU         $1C                       ; Pointer to queue element to abort (KillNBP)
  175. clientName      EQU         $1C                        ; (csCode+2) AtalkClosePrep call parm
  176. ;
  177. ; Names Table Queue element - the MPP registered names (and associated sockets)
  178. ;
  179. ntLink            EQU         0                         ; Link to next element
  180. ntTuple           EQU         4                         ; Start of tuple for replies
  181. ntSocket          EQU         7                         ; Socket number of entity [byte]
  182. ntEntity          EQU         9                         ; Start of entity name within tuple
  183. ;
  184. ; Well-known offsets within MPP local variables (as pointed to by AbusVars)
  185. ;
  186. sysLAPAddr        EQU         0                         ; This node's LAP address
  187. toRHA             EQU         1                         ; Top of RHA
  188. sysABridge        EQU         $19                       ; Node address of a bridge [byte]
  189. sysNetNum         EQU         $1A                       ; This node's network number [word]
  190. vSCCEnable        EQU         $1C                       ; SR value to re-enable SCC interrupts [word]
  191. atpVars           EQU         $1E                       ; ATP variable pointer (high byte is flag)
  192. ;
  193. ; MPP miscellaneous
  194. ;
  195. p2Version        EQU            53                        ; First version with Phase 2 calls
  196. rhaSize           EQU         $18                       ; Size of read header area
  197. wdsEntrySz        EQU         6                         ; Size of a WDS entry
  198. NBPWildCard     EQU         '≈'                     ; NBP wildcard delim char
  199. NBPMaxTupleSize EQU         32                      ; max size for a tuple name
  200. DDPHopsMask     EQU         $3C00                    ; Mask Hop Count bits from field in DDP header
  201. ;
  202. ; Bits in ioMix field on open (passed in)
  203. ;
  204. SrvAdrBit       EQU         31                      ; = 1 iff nodeID in server range ($80 - $FD) desired
  205. RouterBit       EQU         30                      ; = 1 iff this is a router port
  206. NoZoneNotify     EQU            29                      ; = 1 to supress Notification Mgr messages at .MPP open
  207. ;
  208. ; Bits in ioMix field on open (returned)
  209. ;
  210. BadZoneHintBit     EQU          7                       ; = 1 iff zone hint was found invalid at .MPP open
  211. OneZoneBit      EQU         6                       ; = 1 iff there was only one zone on cable
  212. BadNetHintBit     EQU           5                       ; = 1 iff our net not within RTMP cable range
  213. InStartupBit     EQU            4                       ; = 1 iff our net is in the startup range
  214. ;
  215. ;
  216. ;
  217. ; AppleTalk Transaction Protocol (ATP)
  218. ;
  219. atp               EQU         $3                        ; ATP type code (in DDP header)
  220. ;
  221. ; ATP header
  222. ;
  223. atpControl        EQU         0                         ; Control field [byte]
  224. atpBitmap         EQU         1                         ; Bitmap (requests only) [byte]
  225. atpRespNo         EQU         1                         ; Response number (responses only) [byte]
  226. atpTransID        EQU         2                         ; Transaction ID [word]
  227. atpUserData       EQU         4                         ; Start of user data [long]
  228. atpHdSz           EQU         8                         ; Size of ATP header
  229. ;
  230. ; ATP control field
  231. ;
  232. atpReqCode        EQU         $40                       ; Request code after masking
  233. atpRspCode        EQU         $80                       ; Response code after masking
  234. atpRelCode        EQU         $C0                       ; Release code after masking
  235. atpXOBit          EQU         5                         ; Bit number of exactly-once bit
  236. atpEOMBit         EQU         4                         ; Bit number of End-Of-Message bit
  237. atpSTSBit         EQU         3                         ; Send Transmission Status bit no.
  238. flagMask          EQU         $3F                       ; Mask for just flags
  239. controlMask       EQU         $F8                       ; Mask for good control bits
  240. ;
  241. ; ATP limits
  242. ;
  243. atpMaxNum         EQU         8                         ; Max no. of responses per request
  244. atpMaxData        EQU         $242                      ; Maximum data size in ATP packet
  245. ;
  246. ; ATP contol calls
  247. ;
  248. nSendRequest      EQU         248                       ; NSendRequest code
  249. relRspCB          EQU         249                       ; Release RspCB
  250. closeATPSkt       EQU         250                       ; Close ATP socket
  251. addResponse       EQU         251                       ; Add response code | Require open skt |
  252. sendResponse      EQU         252                       ; Send response code 
  253. getRequest        EQU         253                       ; Get request code
  254. openATPSkt        EQU         254                       ; Open ATP socket
  255. sendRequest       EQU         255                       ; Send request code
  256. relTCB            EQU         256                       ; Release TCB
  257. killGetReq        EQU         257                       ; Kill GetRequest
  258. killSendReq       EQU         258                       ; Kill SendRequest
  259. killAllGetReq     EQU           259                     ; Kill all getRequests for a skt
  260.  
  261. ;
  262. ;
  263. ;
  264. ; ATP queue element standard structure: arguments passed in the CSParam area
  265. ;
  266. atpSocket         EQU         $1C                       ; Socket number is first parameter [byte]
  267. atpFlags          EQU         $1D                       ; Flag [byte]
  268. addrBlock         EQU         $1E                       ; Start of address block
  269. reqLength         EQU         $22                       ; Size of request buffer [word]
  270. reqPointer        EQU         $24                       ; Pointer to request buffer or data
  271. bdsPointer        EQU         $28                       ; Pointer to Buffer Data Structure (BDS)
  272. guArea            EQU         $2C                       ; Start of general-use area
  273. userData          EQU         $12                       ; User bytes
  274. ;
  275. ; ATP bits
  276. ;
  277. sendCHK           EQU         0                         ; Bit no. of send-checksum bit in flags
  278. tidValid          EQU         1                         ; Bit set when TID valid in SendRequest
  279. ;
  280. ; SendRequest call interface
  281. ;
  282. numOfBuffs        EQU         $2C                       ; No. of response buffers passed in BDS [byte]
  283. timeoutVal        EQU         $2D                       ; Timeout length in seconds [byte]
  284. numOfResps        EQU         $2E                       ; Number of responses received [byte]
  285. retryCount        EQU         $2F                       ; Maximum number of retries [byte]
  286. ;
  287. reqTID            EQU         $16                       ; Request's TID returned here (for RelTCB)
  288. currBitmap        EQU         $1C                       ; Bitmap of responses not yet received [byte]
  289. ;
  290. ; GetRequest call interface
  291. ;
  292. bitmap            EQU         $2C                       ; Offset where bitmap is returned [byte]
  293. transID           EQU         $2E                       ; Transaction ID returned here [word]
  294. ;
  295. ; SendResponse call interface
  296. ;
  297. bdsSize           EQU         $2D
  298. ;
  299. ; AddResponse call interface
  300. ;
  301. rspNum            EQU         $2C                       ; No. of this response with transaction [byte]
  302. ;
  303. aKillQEl          EQU         $2C                       ; Offset: Pointer to queue element to abort
  304. ;
  305. ; ATP general
  306. ;
  307. maxReqs           EQU         6                         ; Maximum number of concurrent requests
  308. maxRsps           EQU         8                         ; Max number of concurrent XO responses
  309. maxATPSkts        EQU         6                         ; Max number of concurrent responding-sockets
  310. releaseTime       EQU         30                        ; Release timer value in seconds
  311. ;
  312. ; Info for TRel timer in SendRequest and NSendRequest
  313. ;
  314. atpTRTOmask        EQU            7                        ; mask to TRel timeout factor
  315. atpXcall        EQU            2                        ; bit to indicate extended atp call parms
  316. TRelTime        EQU            50                        ; TRel timeout bits offset
  317. ;
  318. ; ATP Buffer Descriptor Structure (BDS)
  319. ;
  320. bdsBuffSz         EQU         0                         ; Send: data length Receive: buffer length
  321. bdsBuffAdr        EQU         2                         ; Send: data address Receive: buffer address
  322. bdsDataSz         EQU         6                         ; Send: used internally Receive: data length
  323. bdsUserData       EQU         8                         ; Send: 4 user bytes Receive: 4 user bytes
  324. bdsEntrySz        EQU         12                        ; Size of a BDS entry
  325. ;
  326. ;
  327. ;+ Zone Information Protocol (ZIP)
  328. ;
  329. ZIP               EQU         6                        ; ZIP type code (in DDP header)
  330. ZIS             EQU         6                       ; Zone Information Socket number
  331. ;
  332. ;
  333. ; ZIP header
  334. ;
  335. zipCommand            EQU     0                           ; Offset to ZIP command in packet
  336. zipFlags            EQU     1                           ; Offset to flags (see below)
  337. zipFirstNet            EQU     2                            ; Network 1 in ZIP query, reply
  338. zipNetLo            EQU     zipFirstNet                    ; Offset to low network number in range
  339. zipNetHi            EQU        4                            ; Offset to high network number in range
  340. zipXHdSz               EQU     6                             ; Size of ZIP header (for extended ZIP)
  341. ;
  342. ; ZIP limits
  343. ;
  344. MaxZoneLen            EQU        33                            ; max size (in bytes) of zone name
  345. ZIPNetMax            EQU     3                           ; Our max networks in a ZIP packet
  346. ;
  347. ; ZIP Command field
  348. ;
  349. ZQuery              EQU     1                           ; Command code for query
  350. ZReply              EQU     2                           ; Command code for reply
  351. ZTakedown           EQU     3                           ; ZIP takedown
  352. ZBringUp            EQU     4                           ; ZIP bring up
  353. ZGetInfo            EQU        5                            ; GNI request
  354. ZInfoReply            EQU        6                            ; GNI reply
  355. ZNotify                EQU        7                            ; ZIP notify
  356. ZIPExtReply            EQU        8                            ; Command code for ZIPExtReply
  357. ;
  358. ; ZIP commands used in ATP calls
  359. ;
  360. ZATPCommand     EQU         0                       ; ZIP command offset in ATP user bytes (request)
  361. ZGZLStart       EQU         2                       ; User byte offset for StartIndex (GetZoneList)
  362. ZLastFlag       EQU         0                       ; User byte offset for LastFlag (GZL response)
  363. ZGZLCount       EQU         2                       ; User byte offset for Count (GZL response)
  364. ZGetMyZone        EQU         7                       ; Code for GetMyZone command
  365. ZGetZoneList    EQU         8                       ; Code for GetZoneList command
  366. ZGetLocalZones    EQU         9                       ; Code for GetLocalZones command
  367. ;
  368. ;
  369. ; ZIP Flags field
  370. ;
  371. ; (GetNetInfo Request)
  372. ;
  373. BcastReply            EQU        7                            ; Send reply to broadcast address
  374. ;
  375. ; (GetNetInfo Reply)
  376. ;
  377. ZoneInvalid            EQU        7                            ; zone is invalid
  378. UseBroadcast        EQU        6                            ; use broadcast for NBP lookups
  379. OneZone                EQU        5                            ; only one zone is present
  380. ;
  381. ; RTMP+ definitions
  382. ;
  383. ;
  384. rtmpPlus          EQU         5                         ; DDP type for RTMP+ packet
  385. getNetInfo        EQU         1                         ; RTMP+ command type for GetNetInfo
  386. ;
  387.                   EJECT
  388. ;
  389. ; ASP definitions
  390. ;
  391. ;
  392. ; Offsets in user bytes
  393. ;
  394. aspCmdCode        EQU         0                         ; Offset to command field
  395. aspWSSNum         EQU         1                         ; WSS number in OpenSessions
  396. aspVersNum        EQU         2                         ; ASP version number in OpenSessions
  397. ;
  398. aspSSSNum         EQU         0                         ; SSS number in OpenSessReplies
  399. aspSessID         EQU         1                         ; Session ID (requests & OpenSessReply)
  400. aspOpenErr        EQU         2                         ; OpenSessReply error code
  401. ;
  402. aspSeqNum         EQU         2                         ; Sequence number in requests
  403. aspAttnCode       EQU         2                         ; Attention bytes in attentions
  404. ;
  405. ; Offsets in ATP data part
  406. ;
  407. aspWrBSize        EQU         0                         ; Offset to write buffer size (WriteData)
  408. aspWrHdrSz        EQU         2                         ; Size of data part
  409. ;
  410. ; ASP command codes - the following define the different types of ASP requests:
  411. ;
  412. aspCloseSess      EQU         1                         ; Close session
  413. aspCommand        EQU         2                         ; User-command
  414. aspGetStat        EQU         3                         ; Get status
  415. aspOpenSess       EQU         4                         ; Open session
  416. aspTickle         EQU         5                         ; Tickle
  417. aspWrite          EQU         6                         ; Write
  418. aspDataWrite      EQU         7                         ; WriteData (from server)
  419. aspAttention      EQU         8                         ; Attention (from server)
  420. ;
  421. ; ASP miscellaneous
  422. ;
  423. aspVersion        EQU         $0100                     ; ASP version number
  424. maxCmdSize        EQU         atpMaxData                ; Maximum command block size
  425. quantumSize       EQU         atpMaxData*atpMaxNum      ; Maximum reply size
  426. tickleInt         EQU         30                        ; Tickle interval (secs)
  427. tickleTime        EQU         tickleInt*60*4            ; Tickle timeout (ticks)
  428. ;
  429. ;+ Control codes. NOTE: high byte of CSCode used internally
  430. ;
  431. openSess          EQU         255                       ; Open session
  432. closeSess         EQU         254                       ; Close session
  433. userCommand       EQU         253                       ; User command
  434. userWrite         EQU         252                       ; User write
  435. getStatus         EQU         251                       ; Get status
  436. afpCall           EQU         250                       ; AFP command (buffer has command code)
  437. getParms          EQU         249                       ; Get parameters
  438. abortOS           EQU         248                       ; Abort open session request
  439. closeAll          EQU         247                       ; Close all open sessions
  440. xCall            EQU            246                        ; .XPP extended calls
  441. ;
  442. ;
  443. ; ASP queue element standard structure: arguments passed in the CSParam area
  444. ;
  445. sessRefnum        EQU         $1C                       ; Offset to session refnum [word]
  446. aspTimeout        EQU         $1E                       ; Timeout for ATP [byte]
  447. aspRetry          EQU         $1F                       ; Retry count for ATP [byte]
  448. serverAddr        EQU         $20                       ; Server address block [longword]
  449. scbPointer        EQU         $24                       ; SCB pointer [longword]
  450. attnRoutine       EQU         $28                       ; Attention routine pointer [long]
  451. ;
  452. cbSize            EQU         $20                       ; Command block size [word]
  453. cbPtr             EQU         $22                       ; Command block pointer [long]
  454. rbSize            EQU         $26                       ; Reply buffer size [word]
  455. rbPtr             EQU         $28                       ; Reply buffer pointer [long]
  456. wdSize            EQU         $2C                       ; Write data size [word]
  457. wdPtr             EQU         $2E                       ; Write data pointer [long]
  458. ccbStart          EQU         $32                       ; Start of memory for CCB
  459. ;
  460. aspMaxCmdSize     EQU         $1C                       ; For SPGetParms [word]
  461. aspQuantumSize    EQU         $1E                       ; For SPGetParms [word]
  462. numSesss          EQU         $20                       ; For SPGetParms [word]
  463. ;
  464. abortSCBPtr       EQU         $1C                       ; SCB pointer for AbortOS [long]
  465. ;
  466. cmdResult         EQU         $12                       ; Command result (ATP user bytes) [long]
  467. ;
  468. afpAddrBlock      EQU         $2C                       ; Address block in AFP login [long]
  469. afpSCBPtr         EQU         $30                       ; SCB pointer in AFP login [long]
  470. afpAttnRoutine    EQU         $34                       ; Attn routine pointer in AFP login
  471. ;
  472. scbMemSize        EQU         $C0                       ; Size of memory for SCB
  473.                   EJECT
  474. ;______________________________________________________________
  475. ;
  476. ; .XPP xCall information
  477. ;______________________________________________________________
  478. ;
  479. ; xCall subCode definitions (subCodes 0 thru 4 are reserved for internal use)
  480. ;
  481. xAddCall            EQU         0
  482. xDelCall            EQU         1
  483.  
  484.  
  485. zipGetLocalZones    EQU            5                    ; xCall subcodes
  486. zipGetZoneList         EQU          6
  487. zipGetMyZone         EQU            7
  488.  
  489. xMinCall            EQU         zipGetLocalZones    ; first xCall that can be added
  490. xMaxCall            EQU         31                  ; highest legal xCall
  491. ;
  492. ; xCall queue element offsets
  493. ;
  494. xppSubCode          EQU         $1C                    ; (csCode+2) offset to extended call subcode
  495. AddCSCode           EQU         xppSubCode+2        ; csCode of added call
  496. AddCSAddr           EQU         AddCSCode+2         ; addr of added call's routine
  497.  
  498. ;
  499. ; SetMyZone queue element offsets (MPP)
  500. ;
  501. zoneBuffPtr         EQU         30
  502. zoneBuffSize         EQU            34
  503. numOfZones          EQU         36
  504.  
  505.  
  506. xppTimeout          EQU         30
  507. xppRetry            EQU         31
  508. zipBuffPtr          EQU         34
  509. zipNumZones         EQU         38
  510. zipLastFlag         EQU         40
  511. zipInfoField         EQU            42
  512.  
  513. ;______________________________________________________________
  514. ;
  515. ; AFP Command command codes
  516. ;______________________________________________________________
  517. ;
  518. afpByteRangeLock  EQU         1
  519. afpVolClose       EQU         2
  520. afpDirClose       EQU         3
  521. afpForkClose      EQU         4
  522. afpCopyFile       EQU         5
  523. afpDirCreate      EQU         6
  524. afpFileCreate     EQU         7
  525. afpDelete         EQU         8
  526. afpEnumerate      EQU         9
  527. afpFlush          EQU         10
  528. afpForkFlush      EQU         11
  529. afpGetDirParms    EQU         12
  530. afpGetFileParms   EQU         13
  531. afpGetForkParms   EQU         14
  532. afpGetSInfo       EQU         15
  533. afpGetSParms      EQU         16
  534. afpGetVolParms    EQU         17
  535. afpLogin          EQU         18
  536. afpContLogin      EQU         19
  537. afpLogout         EQU         20
  538. afpMapID          EQU         21
  539. afpMapName        EQU         22
  540. afpMove           EQU         23
  541. afpOpenVol        EQU         24
  542. afpOpenDir        EQU         25
  543. afpOpenFork       EQU         26
  544. afpRead           EQU         27
  545. afpRename         EQU         28
  546. afpSetDirParms    EQU         29
  547. afpSetFileParms   EQU         30
  548. afpSetForkParms   EQU         31
  549. afpSetVolParms    EQU         32
  550. afpWrite          EQU         33
  551. afpGetFlDrParms   EQU         34
  552. afpSetFlDrParms   EQU         35
  553. ;
  554. afpDTOpen         EQU         48
  555. afpDTClose        EQU         49
  556. afpGetIcon        EQU         51
  557. afpGtIcnInfo      EQU         52
  558. afpAddAPPL        EQU         53
  559. afpRmvAPPL        EQU         54
  560. afpGetAPPL        EQU         55
  561. afpAddCmt         EQU         56
  562. afpRmvCmt         EQU         57
  563. afpGetCmt         EQU         58
  564. ;
  565. afpAddIcon        EQU         192                       ; Special code for ASP Write commands
  566. ;
  567. ;____________________________________
  568. ;
  569. ; Offsets for certain parameters in AFP Read/Write calls
  570. ;____________________________________
  571. ;
  572. startEndFlag      EQU         $1                        ; Write only; offset relative to start or end
  573. rwOffset          EQU         $4                        ; Offset at which to start read or write
  574. reqCount          EQU         $8                        ; Count of bytes to read or write
  575. newLineFlag       EQU         $C                        ; Read only; newline character flag
  576. newLineChar       EQU         $D                        ; Read only; newline character
  577. ;
  578. lastWritten       EQU         $0                        ; Write only; last written (returned)
  579. ;
  580. ;____________________________________
  581. ;
  582. ; Miscellaneous
  583. ;____________________________________
  584. ;
  585. afpUseWrite       EQU         $C0                       ; first call in range that maps to an ASPWrite
  586.  
  587.  
  588. MaxNodeIds      EQU         254                     ; maximum node ids (1-254)
  589. MaxNetIds       EQU         $FFFE                   ; maximum net ids (1-65534)
  590. reservedNode     EQU            $FE                     ; special SysABridge token says we've heard from router
  591. reservedNet     EQU         $FF00                   ; first network number in reserved range
  592.  
  593.  
  594. ; GetAppleTalkInfo
  595.  
  596. GAIVersion        EQU        1                                ; highest version for GAI params
  597.  
  598. GAI         RECORD      $1C                                 ; (csParam) GetAppleTalkInfo params
  599. Version     DS.W        1                                ; --> params version desired
  600. VarsPtr     DS.L        1                                ; <-- MPP vars for this PortID
  601. DCEPtr        DS.L        1                                ; <-- DCE ptr for the PortID
  602. PortID        DS.W        1                                ; <-- port number [0..7]
  603. Configuration DS.L        1                                ; <-- 32-bit config word
  604. SelfSend    DS.W        1                                ; <-- ≠ zero if SelfSend is enabled
  605. NetLo        DS.W        1                                ; <-- low-value of network range
  606. NetHI        DS.W        1                                ; <-- high-value of network range
  607. OurAddr     DS.L        1                                ; <-- our 24-bit AppleTalk address
  608. RouterAddr    DS.L        1                                ; <-- 24-bit address of last router
  609. NumOfPHs    DS.W        1                                ; <-- max. number of protocol handlers
  610. NumOfSkts    DS.W        1                                ; <-- max. number of static sockets
  611. NumNBPEs    DS.W        1                                ; <-- max. number of concurrent NBP requests
  612. NTQueue     DS.L        1                                ; <-- ptr to registered names queue
  613. LALength    DS.W        1                                ; <-> length of data link address in bytes
  614. LinkAddr    DS.L        1                                ; <-> ptr to buffer to store data link address
  615. ZoneName    DS.L        1                                ; <-> ptr to buffer to store zone name
  616. GAISz        DS.B        0
  617.             ENDR
  618.  
  619. RTMPHdr     RECORD        0
  620. SenderNet    DS.W        1                                ; sender's network number
  621. IDlength    DS.B        1                                ; id length (always 8)
  622. SenderID    DS.B        1                                ; sender's node id
  623. NullNet     DS.W        1                                ; null word for non-extended net
  624. Version1    DS.B        1                                ; version for non-extended net
  625. NonExtSize    DS.B        0                                ; minimum size for non-extended
  626.  
  627.             ORG         NullNet
  628. StartNetHi    DS.B        1                                ; extended high range, high byte
  629. StartNetLo    DS.B        1                                ; extended high range, low byte
  630. Distance    DS.B        1                                ; extended range distance
  631. EndNetHi    DS.B        1                                ; extended low range, high byte
  632. EndNetLo    DS.B        1                                ; extended low range, low byte
  633. Version2    DS.B        1                                ; extended version
  634. ExtSize     DS.B        0                                ; mininum size for extended net
  635.             ENDR
  636.  
  637.     ENDIF    ; ...already included